  
<% include '/common/header.gtpl' %>

<h1>Fotoalben</h1>
<div>
 <p class="einleitung1">
 
 <% include '/common/message.gtpl' %>
 </p>	
 	<table>
		<thead>
			<tr>
				<th colspan="3">Bisherige Fotoalben</th>
			</tr>
		</thead>
		<tbody>
 			<% request.list.each { item -> %>
		  	<tr class="rolle_${item.rolle}"> 
		   		<td>
		   			<a title="Details anzeigen" href="/album/editalbum?key=${com.google.appengine.api.datastore.KeyFactory.keyToString(item.key)}">
		   				${item.name} (${request.anzahl[item.key]})</a>
		   		</td>
		   		<td>
		   			${item.anmerkung}
		   		</td>
		   		<td class="delete">
	   				<a title="Löschen" href="/album/delete?key=${com.google.appengine.api.datastore.KeyFactory.keyToString(item.key)}"
	   					onClick="return confirm('Das Album ${item.name} mit allen Fotos ${request.anzahl[item.key]} wirklich löschen?')">
	   					<img alt="Löschen" title="Löschen" src="/images/delete.gif">
	   				</a>
	   			</td>
		   </tr>
		   <% } %>
   		</tbody>
   	</table>
  	<br/><br/>
 	<form action="/album/savealbum" method="post">
	 	<table>
			<thead>
				<tr>
					<th colspan="4">Neues Fotoalbum hinzufügen</th>
				</tr>
			</thead>
			<tbody>
				<tr>
					<td class="bold">Name</td>
					<td>
						<input type="text" name="name" />
					</td>
				</tr>
				<tr>
					<td class="bold">Beschreibung</td>
					<td>
						<input class="breiter" type="text" name="anmerkung" />
					</td>
				</tr>
				<tr>
					<td></td>
					<td>
						<input class="buttonlogin" type="submit" value="Erstellen" />
 					</td>
				</tr>
			</tbody>
		</table>
	</form>
</div>
<% include '/common/footer.gtpl' %>

